package com.bsoft.gol.hbs.dao;

import ctd.persistence.annotation.DAOMethod;
import ctd.persistence.annotation.DAOParam;
import ctd.persistence.support.hibernate.HibernateSupportDelegateDAO;
import ctd.spring.boot.annotation.SsdevDao;
import ctd.util.annotation.RpcService;
import hcn.base.feerule.ExpressFeeRule;

import java.util.List;
@SsdevDao(serviceId = "expressFeeRule")
public abstract class ExpressFeeRuleDAO extends HibernateSupportDelegateDAO<ExpressFeeRule> {

    public ExpressFeeRuleDAO() {
        this.setKeyField("ruleId");
    }

    @DAOMethod(sql = " from ExpressFeeRule where status=1")
    public abstract List<ExpressFeeRule> findExpressFeeRuleList();

    @RpcService
    @DAOMethod(sql = " from ExpressFeeRule where ruleId=:ruleId")
    public abstract ExpressFeeRule getExpressFeeRule(@DAOParam("ruleId") String ruleId);

}
